<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /**
     * unshift(被添加元素)  push(被添加元素)
    */
   var currentDay = "星期四";
   var dayList = [currentDay];
   dayList.unshift("星期三");
   dayList.unshift("星期二");
   dayList.unshift("星期一");
   dayList.push("星期五");
   dayList.push("星期六");
   dayList.push("星期日");
   console.log(dayList);

   var arr1 = ["hello","world"];
   var arr2 = ["hello","JavaScript"];
   var arr3 = ["arr3"];
   /**
    * arr.concat(arr1,arr2)
    * 会将arr，arr1，arr2合并，得到一个新数组，但不会对arr产生影响
   */
   var arr4 = arr1.concat(arr2,arr3);
   console.log(arr4);
</script>
</html>